feat(maintain): extract-helper scope (v8) — parameterized dedup with zero call-site risk#99
Merged
Merged
Conversation
…ZERO call-site risk The near-dupe detection (find_similar_helpers) + parameterize proposal (v2) become an unattended maintain scope — in the only shape safe enough for 3am: - Pick ONE cluster that comes back WITH a mechanical parameterize proposal (bodies align token-for-token, ≤4 varying spots). No proposal → BLOCK — manual judgment isn't a nightly job. - Create the shared parameterized helper, then rewrite each original as a ONE-LINE delegating wrapper using the proposal's argument mapping. Signatures, exports, and every call site stay byte-for-byte compatible — the zero-caller-risk form of deduplication (unlike consolidate-dupes, which repoints callers and needs the full reference proof). - Skips clusters touching tests/generated code or with `dropped` (structurally different) members. - Ships through the shared verified-PR protocol: tests + types green or nothing lands. Parse aliases: extract-helper | helpers | parameterize. Demo scope card, docs/MAINTAIN.md v8 row, scope-list + prompt tests updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P1b concluded: the near-dupe pipeline (
find_similar_helpers#91 + parameterize proposals #95) becomes an unattended maintain scope — in the only shape safe enough for a nightly run.The safety design
Consolidating near-dupes normally means touching call sites — too risky unattended. v8 sidesteps that entirely:
dropped(structurally different) members.Where v7
consolidate-dupesrepoints callers (needs the full reference proof), v8 needs no caller knowledge at all — the wrapper preserves the public surface. Different risk profile, complementary scopes.extract-helper/helpers/parameterize(+--dry-runas usual)docs/MAINTAIN.md(v8 row)Full suite 1525 green, tsc clean.